package com.example.blog.mapper;

import com.example.blog.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserMapper {
    @Update("UPDATE user SET name = #{name}, age = #{age}, gender = #{gender}, password = #{password}WHERE id = #{id}")
    int updateUser(User user);
    @Select("SELECT * FROM user WHERE id = #{id}")
    User selectUserById(int id);
}